Page({
  data: {
    isFinish: false
  },
  onLoad({ id }) {
    // 获取通行证
    this.getPassport(id)
  },
  async getPassport(id) {
    const { code, data } = await wx.http.get(`/visitor/${id}`)
    if (code !== 10000) return wx.utils.toast()
    this.setData({
      ...data
    })
  },
  // 倒计时结束时触发
  countDownFinish() {
    this.setData({
      isFinish: true
    })
  }
})
